import { statusList } from '@/utils/enums'

export const statusEnums = {
  1: '开启',
  2: '关闭'
}

/** 表单 */
export const formData = {
  postName: '',
  status: ''
}
export const formConfig = [
  {
    type: 'input',
    prop: 'name',
    label: '岗位名称',
    clearable: true
  },
  {
    type: 'select',
    prop: 'select',
    label: '状态',
    clearable: true,
    isEnum: true,
    options: statusEnums
  }
]
/** 表格 */
export const tableColumns = [
  {
    label: '岗位名称',
    prop: 'postName'
  },
  {
    label: '岗位薪资',
    prop: 'postWage'
  },
  {
    label: '状态',
    prop: 'status',
    slotName: 'status'
  },
  {
    label: '创建时间',
    prop: 'createTime'
  },
  {
    label: '操作',
    prop: 'operation',
    slotName: 'operation'
  }
]

/** 新增 编辑 */
export const aFormData = {
  postName: '',
  postWage: '',
  status: 1
}
export const aFormConfig = [
  {
    type: 'input',
    prop: 'postName',
    label: '岗位名称',
    span: 24,
    clearable: true
  },
  {
    type: 'input',
    kind: 'number',
    prop: 'postWage',
    label: '岗位薪资',
    span: 24,
    clearable: true
  },
  {
    type: 'radio',
    prop: 'status',
    label: '状态',
    span: 24,
    options: statusList
  }
]
export const aFormRules = {
  postName: [{ required: true, message: '请输入岗位名称', trigger: 'blur' }]
}
